#include <stdio.h>

int main()
{
    int leap_year;

    printf("(如若退出,请输入-1)请输入年份:\n");
    while(1){
        scanf("%d",&leap_year);
        if((leap_year % 4==0 && leap_year % 100 != 0)||leap_year % 400 == 0)
            printf("%d是闰年\n",leap_year);
        else if(leap_year == -1)
            break;
        else
            printf("%d不是闰年\n",leap_year);
    }
    return 0;
}